<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <input type="text" v-model="msg" />

      <div>{{ msg }}</div>

      <button @click="save()">保存</button>
    </div>

    <script src="../vue3.2.45.js"></script>
    <script>
      const app = Vue.createApp({
        data() {
          return {
            msg: "111",
          };
        },
        methods: {
          save() {
            console.log(this.$data);
          },
        },
      });

      const vm = app.mount("#app");

      console.log(vm.$data.msg);
      console.log(vm.msg);
      /*
        导入 vue.js
        创建 vue 应用（实例）
        绑定视图（html）
      */
    </script>
  </body>
</html>
